GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask);
+ GdkWindowAttr *attributes);
gboolean _gdk_broadway_display_set_selection_owner (GdkDisplay *display,
GdkWindow *owner,
GdkAtom selection,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
GdkWindowImplBroadway *impl;
GdkBroadwayDisplay *broadway_display;
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
GDK_DISPLAY_GET_CLASS (display)->create_window_impl (display,
window,
real_parent,
screen,
event_mask,
- attributes,
- attributes_mask);
+ attributes);
}
GdkWindow *
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask);
+ GdkWindowAttr *attributes);
GdkKeymap * (*get_keymap) (GdkDisplay *display);
void (*push_error_trap) (GdkDisplay *display);
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask);
+ GdkWindowAttr *attributes);
GdkWindow * _gdk_display_create_window (GdkDisplay *display);
gboolean gdk_display_make_gl_context_current (GdkDisplay *display,
GDK_GL_GLES = 1 << 6
} GdkGLFlags;
-typedef enum
-{
- GDK_WA_X = 1 << 1,
- GDK_WA_Y = 1 << 2
-} GdkWindowAttributesType;
-
extern GList *_gdk_default_filters;
extern GdkWindow *_gdk_parent_root;
_gdk_window_ref_cairo_surface (GdkWindow *window);
GdkWindow* gdk_window_new (GdkWindow *parent,
- GdkWindowAttr *attributes,
- gint attributes_mask);
+ GdkWindowAttr *attributes);
void _gdk_window_destroy (GdkWindow *window,
gboolean foreign_destroy);
void _gdk_window_clear_update_area (GdkWindow *window);
}
}
-/**
- * gdk_window_new: (constructor)
- * @parent: (allow-none): a #GdkWindow, or %NULL to create the window as a child of
- * the default root window for the default display.
- * @attributes: attributes of the new window
- * @attributes_mask: (type GdkWindowAttributesType): mask indicating which
- * fields in @attributes are valid
- *
- * Creates a new #GdkWindow using the attributes from
- * @attributes. See #GdkWindowAttr and #GdkWindowAttributesType for
- * more details. Note: to use this on displays other than the default
- * display, @parent must be specified.
- *
- * Returns: (transfer full): the new #GdkWindow
- **/
GdkWindow*
gdk_window_new (GdkWindow *parent,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
GdkWindow *window;
GdkScreen *screen;
GdkDisplay *display;
- int x, y;
gboolean native;
GdkEventMask event_mask;
GdkWindow *real_parent;
window->focus_on_map = TRUE;
window->event_compression = TRUE;
- if (attributes_mask & GDK_WA_X)
- x = attributes->x;
- else
- x = 0;
-
- if (attributes_mask & GDK_WA_Y)
- y = attributes->y;
- else
- y = 0;
-
- window->x = x;
- window->y = y;
+ window->x = attributes->x;
+ window->y = attributes->y;
window->width = (attributes->width > 1) ? (attributes->width) : (1);
window->height = (attributes->height > 1) ? (attributes->height) : (1);
window->alpha = 255;
event_mask = get_native_event_mask (window);
/* Create the impl */
- _gdk_display_create_window_impl (display, window, real_parent, screen, event_mask, attributes, attributes_mask);
+ _gdk_display_create_window_impl (display, window, real_parent, screen, event_mask, attributes);
window->impl_window = window;
parent->impl_window->native_children = g_list_prepend (parent->impl_window->native_children, window);
attr.event_mask = event_mask;
attr.wclass = GDK_INPUT_OUTPUT;
+ attr.x = 0;
+ attr.y = 0;
attr.width = width;
attr.height = height;
attr.window_type = GDK_WINDOW_TOPLEVEL;
return gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (display)),
- &attr,
- 0);
+ &attr);
}
/**
attr.window_type = GDK_WINDOW_TEMP;
return gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (display)),
- &attr,
- GDK_WA_X | GDK_WA_Y);
+ &attr);
}
/**
attr.window_type = GDK_WINDOW_TEMP;
return gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (display)),
- &attr,
- GDK_WA_X | GDK_WA_Y);
+ &attr);
}
/**
attr.height = position->height;
attr.window_type = GDK_WINDOW_CHILD;
- return gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
+ return gdk_window_new (parent, &attr);
}
/**
attr.height = position->height;
attr.window_type = GDK_WINDOW_CHILD;
- return gdk_window_new (parent, &attr, GDK_WA_X | GDK_WA_Y);
+ return gdk_window_new (parent, &attr);
}
static gboolean
window, parent,
screen,
get_native_event_mask (window),
- NULL, 0);
+ NULL);
new_impl = window->impl;
parent->impl_window->native_children =
const gchar *_gdk_mir_cursor_get_name (GdkCursor *cursor);
-GdkWindowImpl *_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window, GdkWindowAttr *attributes, gint attributes_mask);
+GdkWindowImpl *_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window);
void _gdk_mir_window_impl_set_surface_state (GdkMirWindowImpl *impl, MirSurfaceState state);
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
//g_printerr ("gdk_mir_display_create_window_impl");
//g_printerr (" window=%p", window);
if (attributes->wclass == GDK_INPUT_OUTPUT)
{
- window->impl = _gdk_mir_window_impl_new (display, window, attributes, attributes_mask);
+ window->impl = _gdk_mir_window_impl_new (display, window);
window->impl_window = window;
}
else /* attributes->wclass == GDK_INPUT_ONLY */
s->root_window->width = width;
s->root_window->height = height;
s->root_window->viewable = TRUE;
- s->root_window->impl = _gdk_mir_window_impl_new (s->display, s->root_window, NULL, 0);
+ s->root_window->impl = _gdk_mir_window_impl_new (s->display, s->root_window);
return s->root_window;
}
}
GdkWindowImpl *
-_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window, GdkWindowAttr *attributes, gint attributes_mask)
+_gdk_mir_window_impl_new (GdkDisplay *display, GdkWindow *window)
{
GdkMirWindowImpl *impl = g_object_new (GDK_TYPE_MIR_WINDOW_IMPL, NULL);
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask);
+ GdkWindowAttr *attributes);
/* Display methods - keymap */
GdkKeymap * _gdk_quartz_display_get_keymap (GdkDisplay *display);
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
GdkWindowImplQuartz *impl;
GdkWindowImplQuartz *parent_impl;
window->width,
window->height);
- if (window->window_type == GDK_WINDOW_TEMP ||
- ((attributes_mask & GDK_WA_TYPE_HINT) &&
- attributes->type_hint == GDK_WINDOW_TYPE_HINT_SPLASHSCREEN))
+ if (window->window_type == GDK_WINDOW_TEMP)
{
style_mask = NSBorderlessWindowMask;
}
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask);
+ GdkWindowAttr *attributes);
GdkWindow *_gdk_wayland_display_get_selection_owner (GdkDisplay *display,
GdkAtom selection);
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
GdkWaylandDisplay *display_wayland = GDK_WAYLAND_DISPLAY (display);
GdkWindowImplWayland *impl;
attr.window_type = GDK_WINDOW_SUBSURFACE;
return gdk_window_new (gdk_screen_get_root_window (gdk_display_get_default_screen (display)),
- &attr,
- GDK_WA_X | GDK_WA_Y);
+ &attr);
}
/**
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
HWND hwndNew;
HANDLE hparent;
gint window_width, window_height;
gint offset_x = 0, offset_y = 0;
gint x, y, real_x = 0, real_y = 0;
- /* check consistency of redundant information */
- guint remaining_mask = attributes_mask;
g_return_if_fail (display == _gdk_display);
(attributes->wclass == GDK_INPUT_OUTPUT ? "" : "input-only"))
);
- /* to ensure to not miss important information some additional check against
- * attributes which may silently work on X11 */
- if ((attributes_mask & GDK_WA_X) != 0)
- {
- g_assert (attributes->x == window->x);
- remaining_mask &= ~GDK_WA_X;
- }
- if ((attributes_mask & GDK_WA_Y) != 0)
- {
- g_assert (attributes->y == window->y);
- remaining_mask &= ~GDK_WA_Y;
- }
-
- if (remaining_mask != 0)
- g_warning ("_gdk_window_impl_new: uexpected attribute 0x%X", remaining_mask);
-
hparent = GDK_WINDOW_HWND (real_parent);
impl = g_object_new (GDK_TYPE_WINDOW_IMPL_WIN32, NULL);
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask);
+ GdkWindowAttr *attributes);
void _gdk_x11_precache_atoms (GdkDisplay *display,
const gchar * const *atom_names,
GdkWindow *real_parent,
GdkScreen *screen,
GdkEventMask event_mask,
- GdkWindowAttr *attributes,
- gint attributes_mask)
+ GdkWindowAttr *attributes)
{
GdkWindowImplX11 *impl;
GdkX11Screen *x11_screen;